package com.dreem.factory.absfactory.pizzastore.order;

import com.dreem.factory.absfactory.pizzastore.pizza.LDBeefPizza;
import com.dreem.factory.absfactory.pizzastore.pizza.LDCheesePizza;
import com.dreem.factory.absfactory.pizzastore.pizza.Pizza;

/**
 * @program: DesignParrtern
 * @description: 伦敦抽象工厂子类
 * @author: Peng
 * @create: 2021-01-25  12:11
 **/
public class LDFactory implements AbsFactory {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if(orderType.equalsIgnoreCase("cheese")){
            pizza = new LDCheesePizza();
        }else if(orderType.equalsIgnoreCase("beef")){
            pizza = new LDBeefPizza();
        }
        return pizza;
    }
}
